<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                template="./../../resources/templates/baseTemplate.xhtml">
    
    
    <ui:define name="content">
                <h:form>

            <p:growl id="growl" sticky="true" showDetail="true"/>
                <p:wizard widgetVar="wiz"
                                flowListener="#{userWizard.onFlowProcess}">

                    <p:tab id="personal" title="Cadastro do Participante">
                                <p:panel header="Detalhes do Cadastro">

                                        <h:messages errorClass="error"/>

                                        <h:panelGrid columns="2" columnClasses="label, value" styleClass="grid">
                                                <h:outputText value="Nome: *" />
                                                <p:inputText Value="#{userWizard.nome}" />

                                                <h:outputText value="Email: *" />
                                                <p:inputText value="#{userWizard.email}" />

                                                <h:outputText value="Telefone: *" />
                                                <p:inputText value="#{userWizard.telefone}" />

                                                <h:outputText value="ID Participante: *" />
                                                <p:inputText value="#{userWizard.idParticipante}" />
                                                
                                                <h:outputText value="Cód. Participante: *" />
                                                <p:inputText value="#{userWizard.codParticipante}" />
                                        </h:panelGrid>
                                </p:panel>
                        </p:tab>

                        <p:tab id="address" title="Evento">
                                <p:panel header="Detalhes do Evento">

                                        <h:messages errorClass="error"/>

                                        <h:panelGrid columns="2" columnClasses="label, value">
                                                <h:outputText value="Nome do evento: " />
                                                <p:inputText value="#{userWizard.nomeEvento}" />

                                                <h:outputText value="Descrição: " />
                                                <p:inputText value="#{userWizard.descEvento}" />

                                                <h:outputText value="Local: " />
                                                <p:inputText value="#{userWizard.local}" />

                                                <h:outputText value="Data: " />
                                                <p:inputText value="#{userWizard.data}" />
                                        </h:panelGrid>
                                </p:panel>
                        </p:tab>

                        <p:tab id="contact" title="Atividade">
                                <p:panel header="Detalhes da Atividade">

                                        <h:messages errorClass="error"/>

                                        <h:panelGrid columns="2" columnClasses="label, value">
                                                <h:outputText value="Nome da Atividade: *" />
                                                <p:inputText value="#{userWizard.nmeAtividade}" />

                                                <h:outputText value="Descrição: " />
                                                <p:inputText value="#{userWizard.descAtividade}"/>

                                                <h:outputText value="Tipo de Público: " />
                                                <p:inputText value="#{userWizard.tipoPublico}"/>
                                        </h:panelGrid>
                                </p:panel>
                        </p:tab>

                        <p:tab id="confirm" title="Confirmação">
                                <p:panel header="Confirmação">

                                        <h:panelGrid id="confirmation" columns="6">
                                            
                                                <!-- Primeira parte do form-->
                                                <h:outputText value="Nome: " />
                                                <h:outputText styleClass="outputLabel"
                                                                        value="#{userWizard.nome}" />

                                                <h:outputText value="Email: " />
                                                <h:outputText  styleClass="outputLabel"
                                                                        value="#{userWizard.email}"/>

                                                <h:outputText value="Telefone: " />
                                                <h:outputText styleClass="outputLabel"
                                                                        value="#{userWizard.telefone}" />>

                                                <h:outputText value="ID Participante: " />
                                                <h:outputText styleClass="outputLabel"
                                                                        value="#{userWizard.idParticipante}" />

                                                <h:outputText value="Cód. Participante: " />
                                                <h:outputText styleClass="outputLabel"
                                                                        value="#{userWizard.codParticipante}" />
                                                
                                                <!-- Segunda parte do form-->
                                                <h:outputText value="Nome do Evento: " />
                                                <h:outputText styleClass="outputLabel"
                                                                        value="#{userWizard.nmeEvento}" />

                                                <h:outputText value="Descrição: " />
                                                <h:outputText styleClass="outputLabel"
                                                                        value="#{userWizard.descEvento}" />

                                                <h:outputText value="Local: " />
                                                <h:outputText styleClass="outputLabel"
                                                                        value="#{userWizard.local}"/>

                                                <h:outputText value="Data: " />
                                                <h:outputText styleClass="outputLabel"
                                                                        value="#{userWizard.data}" />
                                                
                                                <!-- Terceira parte do form-->                                                
                                                <h:outputText value="Nome da Atividade: " />
                                                <h:outputText styleClass="outputLabel"
                                                                        value="#{userWizard.nmeAtividade}" />

                                                <h:outputText value="Descrição: " />
                                                <h:outputText styleClass="outputLabel"
                                                                        value="#{userWizard.descAtividade}" />

                                                <h:outputText value="Tipo de Público: " />
                                                <h:outputText styleClass="outputLabel"
                                                                        value="#{userWizard.tipoPublico}"/>

                                                <h:outputText />
                                                <h:outputText />
                                        </h:panelGrid>

                                        <p:commandButton value="Submit" update="growl" 
                                                                actionListener="#{userWizard.save}"/>

                                </p:panel>
                        </p:tab>

                </p:wizard>

        </h:form>                    

    </ui:define>

</ui:composition>


